url: docs deprecate legacy url API#22715
Conversation
targos
left a comment
There was a problem hiding this comment.
The functions should be marked as deprecated in url.md.
|
@targos ... done! |
addaleax
left a comment
There was a problem hiding this comment.
Hopefully upgraded to Runtime-deprecation in Node.js 12
That time frame seems off by a few years?
|
Would it be to early to add this to the pending deprecations? That would allow people who actively opt in to know that it's deprecated even without looking at the docs. |
TimothyGu
left a comment
There was a problem hiding this comment.
Unfortunately, I see #12682 as a blocker for the deprecation of the legacy URL API. We need to have a story for Express and other modules that still heavily use the legacy API (Express does so through the parseurl wrapper), whether that be a userland module or a Core API, preferably before we start the deprecation proceedings and definitely before we runtime-deprecate the API. Sorry about blocking this.
|
@TimothyGu, that's precisely why this is a documentation only deprecation. |
|
In other words, I don't think we can actually start moving people through the migration until we start the deprecation because there won't be pressure to actually change |
doc/api/deprecations.md
Outdated
There was a problem hiding this comment.
url.format() should be qualified to not include the overload that takes URL objects.
There was a problem hiding this comment.
I'm not sure it should. I added that strictly as a convenience. The intent here is to move people away from the non-standard API and keeping that one variant un-deprecated would not make sense. Folks really should be using the href property on the URL object instead.
doc/api/deprecations.md
Outdated
There was a problem hiding this comment.
Links for the functions and "legacy urlObject" would be nice.
66e8a36 to
3a04026
Compare
doc/api/deprecations.md
Outdated
|
|
||
| The [Legacy URL API][] is deprecated in favor of the newer standardized | ||
| [WHATWG URL][] implementation. This includes uses of [`url.format()`][], | ||
| [`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. |
There was a problem hiding this comment.
@jasnell Is it OK with you if I change the text to this?:
The [Legacy URL API][] is deprecated. This includes [`url.format()`][],
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
use the [WHATWG URL API][] instead.(This will also require updating the link reference currently on line 1158 to say WHATWG URL API rather than WHATWG URL.)
PR-URL: #22715 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
Landed in 922a1b0 |
PR-URL: nodejs#22765 Refs: nodejs#22715 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
|
I do not agree with deprecating |
|
Please define "suitable replacement" as that is quite subjective. The |
It's time to start the deprecation process for the legacy URL API.
Documentation-only deprecation for Node.js 11
Hopefully upgraded to Runtime-deprecation in Node.js 12
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes